<template>
	<vCommonPage type="1" title="门诊缴费">
		<div slot="customContent" class="contentX mzjf">
			<div class="topBoxByJf">
<!-- 				<div class="daysBtnBox">
					<div :class="queryDays == 0 ?'daysBtn btnLeft btnClick':'daysBtn btnLeft'" @click="choseDays(0)">今日
					</div>
					<div :class="queryDays == 1 ?'daysBtn btnRight btnClick':'daysBtn btnRight'" @click="choseDays(1)">
						今日+昨日</div> -->
					<!-- 					<el-button class="daysBtn" @click="choseDays(90)">90天</el-button>
					<el-button class="daysBtn" @click="choseDays(365)">365天</el-button> -->
				<!-- </div> -->
			</div>

			<div class="tableBox">
				<!-- 真实数据模板 -->
					<el-table class="table" :header-cell-style="$tableTitleStye" :cell-style="{color:'#435C7A'}"
						:data="tableData" :show-overflow-tooltip="true">
						<el-table-column prop="deptName" label="就诊科室"></el-table-column>
						<el-table-column prop="doctorName" label="就诊医生"></el-table-column>
						<el-table-column prop="prescDate" label="就诊日期"></el-table-column>
						<el-table-column prop="amount" label="费用总额"></el-table-column>
						<el-table-column width="230" label="操作">
							<template slot-scope="scope">
								<el-button class="elBtn" @click="detail(scope.row)" type="primary" size="medium">详情
								</el-button>
<!-- 								<el-button class="elBtn" @click.once="payItem(scope.row)" type="success" size="medium">
									支付
								</el-button> -->
							</template>
						</el-table-column>
					</el-table>
			</div>
			<div class="bottomBox" style="display: flex; justify-content: space-between;">
				<div style="display: flex;">
				<el-button type="primary" class="BtnTextHome" @click="goBack()">返回</el-button>
				<el-button type="primary" class="BtnTextHome" @click="goBackHome()">首页</el-button>
				</div>
				<el-button type="success"  class="BtnTextGreen" style="width: 180px !important;margin-left: 525px !important;"
					@click="payItem()">全部支付</el-button>
			</div>
		</div>
	</vCommonPage>
</template>
<script>
	import {
		paidOrders
	} from "@api/apiBox/mzjf"
	export default {
		name: "mzjf",
		data() {
			return {
				tableData: [],
				totalPay: 0,
				queryDays: 0,
				emptyData: [],
				isEmpty: false
			};
		},
		methods: {
			payItem() {
				let item = JSON.parse(this.$route.query.data);
				this.$store.dispatch("recipel/updateRecordsInfo", item); //存储缴费订单信息 -- 没有订单ID
				console.log(item, '存储缴费订单')
				this.$router.push({
					name: 'mzcz',
					query: {
						title: "门诊缴费",
						code: 'mzjf'
					}
				})
			},
			detail(item) {
				this.$router.push({
					name: 'mzjfDetail',
					query: {
						title: "门诊缴费",
						detailObj: item.drugList
					}
				})
			},
			choseDays(days) {
				this.queryDays = days;
				this.init();
			}
		},
		computed: {

		},
		components: {},
		mounted() {},
		created() {
			this.tableData = JSON.parse(this.$route.query.data).orders
		}
	};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
	@import "../../assets/css/mzjf/mzjfDetail.scss";
</style>
<style>

</style>
